<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>教师模板内容</title>
</head>
<body>
<div id="teacherContextFragment">
    <table class="table table-hover">
        <thead>
        <tr>
            <td><input onclick="teacherPage.selectAll()" type="checkbox"/></td>
            <td>序号</td>
            <td>教师名称</td>
            <td>助记码</td>
            <td>创建时间</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <th:block th:if="${pageVO.params==null||pageVO.params.size()==0}">
            <tr>
                <td align="center" colspan="6">没有查询到任何信息</td>
            </tr>
        </th:block>
        <th:block th:unless="${pageVO.params==null}">
            <tr th:each="teacher:${pageVO.params}">
                <td><input th:value="${teacher.id}" type="checkbox"/></td>
                <td th:text="${teacher.id}"></td>
                <td th:text="${teacher.tname}"></td>
                <td th:text="${teacher.mnemonic_code}"></td>
                <td th:text="${teacher.create_time}"></td>
                <td>
                    <span>
                        <button th:onclick="teacherPage.edit('[[${teacher.id}]]')" type="button" class="btn btn-default btn-sm" style="background: orange">
                             <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> 编辑
                        </button>
                    </span>
                    <span>
                        <button th:onclick="teacherPage.deleteOne('[[${teacher.id}]]')" type="button" class="btn btn-default btn-sm" style="background: red">
                             <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> 删除
                        </button>
                    </span>
                </td>
            </tr>
        </th:block>
        </tbody>
    </table>
    <nav id="nav" aria-label="Page navigation">
        <ul class="pagination">
            <li th:if="${pageVO.page==1} " class="disabled">
                <a href="javascript:void(0)" aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li th:unless="${pageVO.page==1}" >
                <a th:onclick="|teacherPage.limitQuery(${pageVO.page}-1)|" aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>


            <li  th:class="${pageVO.page==index?'active':''}" th:each="index:${#numbers.sequence(pageVO.pageStart,pageVO.pageEnd)}" th:value="${index}">
                <a th:onclick="|teacherPage.limitQuery(${index})|" th:text="${index}"></a>
            </li>


            <li th:if="${pageVO.page==pageVO.realPage}" class="disabled">
                <a href="javascript:void(0)" aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li th:unless="${pageVO.page==pageVO.realPage}" >
                <a th:onclick="|teacherPage.limitQuery(${pageVO.page}+1)|" aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
        </ul>
    </nav>
</div>
</body>
</html>